import {request} from "@/network/request";

export function login(username, password) {
    return request({
        url: "/user/login",
        method: "post",
        params: {
            username,
            password
        }
    })
}

export function getUserDetail() {
    return request({
        url: "/user/detail",
        method: "get"
    })
}

export function updateUser(message, file) {
    return request({
        url: "/user/update",
        method: 'post',
        params: {
            message
        },
        data: file
    })
}

export function auth() {
    return request({
        url: "/user/auth",
        method: 'get'
    })
}